package org.he.org.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.he.basic.domain.BaseDomain;

import java.io.Serializable;
import java.util.List;

/**
 * @author He
 * @date 2023/11/28  15:10
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ExcelTarget("Employees")
public class Employee extends BaseDomain implements Serializable {
    @Excel(name = "编号",width = 10)
    @ApiModelProperty(value = "员工编号")
    private Long id;
    @Excel(name = "用户名",width = 10)
    @ApiModelProperty(value = "员工姓名")
    private String username;
    @Excel(name = "密码",width = 10)
    @ApiModelProperty(value = "员工密码")
    private String password;
    @Excel(name = "邮箱",width = 25)
    @ApiModelProperty(value = "员工邮箱")
    private String email;
    @Excel(name = "头像",width = 30)
    @ApiModelProperty(value = "员工头像")
    private String headImage;
    @Excel(name = "年龄",width = 10)
    @ApiModelProperty(value = "员工年龄")
    private Integer age;
    @ExcelEntity
//    @ExcelIgnore
    @ApiModelProperty(value = "员工部门")
    private Department department;

//    @Excel(name = "部门",width = 10)
//    private String departmentStr;
//
//    public String getDepartmentStr() {
//        StringBuilder sb = new StringBuilder();
//        sb.insert(0, department.getName());
//        return sb.toString();
//    }
}
